<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE HTML>
<html lang="zh-CN">
    <head>
    <meta charset="UTF-8">
    <title>新建定制项目</title>
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
        <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
        <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css">
    <meta name="decorator" content="default" />
        <script type="text/javascript">
            var windowH = window.innerHeight
                        ||document.documentElement.clientHeight
                        ||document.body.clientHeight
                $('.middle').css('height',windowH - 50);
            
            /* 初始化方法 */
            $(document).ready(function(){
                $(".rtname").each(function(){
                    var divH = $(this).height();
                    if(divH > 40) {
                        $(this).addClass('textOver')
                    };
                });
               });
            
            function delDesign(){
                $.post("${ctx}/custom/customitem/deleteDesignOption?id=${design.id}&&oldItemValue=${design.oldItemValue}",'',function(result){
                    tipParent(result.message);
                    if(result.statusCode==STATUSCODEOK){
                        window.parent.frames[0].location.reload();
                        closeWin(); 
                     }
                },'json');
           }
            
        </script>
    </head>
    <body>
        <form id="inputForm" name="inputForm">
            <!-- 隐藏变量 -->
            <input type="hidden" value="${design.itemValue}" name="itemValue" />
            <input type="hidden" value="${design.id}" name="id" />
            <div id="createHead" class="layerHeader clearfix">
                <p class="headerTitle"><spring:message code="custom_show_item_title"/></p>
                <div class="headerButton clearfix">
                    <shiro:hasPermission name="custom:customitem:edit">
                    <!-- 编辑 -->
                     <button type="button" onclick="popup('935px','550px','${ctx}/custom/customitem/form?id=${design.id}');closeWin();"><spring:message code="company_edit_edit"/></button>
                    <!-- 删除操作 -->
                     <button type="button"  onclick="del(delDesign)"><spring:message code="company_edit_delete"/></button>
                    </shiro:hasPermission>
                    <!-- 取消 -->
                    <button type="button" onclick="closeWin()"><spring:message code="company_edit_cancle"/></button>
                </div>
            </div>
            <div id="showHtml" class="tabBoxSm showHtml" >
                <div class="tabSm smOrderBox">
                    <div class="clearfix">
                        <div class="col-50 items clearfix">
                            <!-- 款式类别 -->
                            <p class="tit"><spring:message code="custom_style_category"/><spring:message code="common_colon"/></p>
                            <input id="styleCategoryCD" name="styleCategoryCD" style="border: none;color: #333;background-color: inherit;margin-left: 30px" disabled="true" value="${fns:getDictName(design.styleCategoryCD)}" >
                        </div>
                        <!--  项目值-->
                        <div class="col-50 items clearfix haveToBox">
                            <p class="tit"><spring:message code="custom_item_value"/><spring:message code="common_colon"/></p>
                            <input id="itemValue" name="itemValue" style="margin-left: 30px" disabled="true"  value="${design.itemValue}" />
                        </div>
                    </div>
                    <div class="">
                        <!--  中文全称： -->
                        <div class="col-50 items clearfix">
                            <p class="tit"><spring:message code="custom_item_cn"/><spring:message code="common_colon"/></p>
                            <input id="itemNameCn" name="itemNameCn" style="border: none;color: #333;background-color: inherit;margin-left: 30px" disabled="true" value="${design.itemNameCN}" >
                        </div>
                        <!--  英文全称-->
                        <div class="col-50 items clearfix haveToBox">
                            <p class="tit"><spring:message code="custom_item_en"/><spring:message code="common_colon"/></p>
                            <input id="itemNameEn" name="itemNameEn" style="margin-left: 30px" value="${design.itemNameEN}" data-rule-required="true" data-msg-required="<spring:message code="company_edit_err_msg_companyShortName"/>">
                        </div>
                    </div>
                    <div class="">
                        <!--  日文全称 -->
                        <div class="col-50 items clearfix haveToBox">
                            <p class="tit"><spring:message code="custom_item_jp"/><spring:message code="common_colon"/></p>
                            <input id="itemNameJp" name="itemNameJp" style="margin-left: 30px" maxlength="50" value="${design.itemNameJP}" data-rule-required="true" data-msg-required="<spring:message code="company_edit_err_msg_companyName"/>">
                        </div>
                        <div class="col-50 items clearfix">&nbsp;</div>
                    </div>
                </div>
                <div class="">
                    <div class="tableArea">
                        <div class="">
                            <div style="float: left;margin-left: 10px">
                                <p class="tit"><spring:message code="custom_sub_item"/>
                                </p>
                            </div>
                            <div style="float: right;">
                             </div>
                        </div>
                        <div class="tableScroll tableScrollSm" style="padding-top: 0px;margin-left: 80px" >
                            <div style = "overflow: auto; position: relative;background-color:#ddd;">
                                <table cellpadding="0" class="" name ="perantTable" id ="perantTable"  style="border: none">
                                    <tr>
                                        <th class="table-gszhkhmc" style="border: none"><spring:message code="custom_item_file"/></th>
                                        <th class="table-gszhkhmc" style="border: none"><spring:message code="custom_item_value"/></th>
                                        <th class="table-gszhkhmc" style="border: none"><spring:message code="custom_item_cost"/></th>
                                        <th class="table-gszhkhsj" style="border: none"><spring:message code="custom_item_cn"/></th>
                                        <th class="table-gszhkhsj" style="border: none"><spring:message code="custom_item_en"/></th>
                                        <th class="table-gszhkhsj" style="border: none"><spring:message code="custom_item_jp"/></th>
                                    </tr>
                                </table>
                            </div>
                            <div style = "overflow: auto; position: relative;background-color:#fff;border:1px solid #B7B9B8;height:282px;">
                                <table cellpadding="0" class="" name ="perantTable" id ="perantTable" >
                                    <c:forEach items="${list}" var="designerOption" varStatus="status">
                                        <tbody >
                                        <tr>
                                            <!-- 项目图片 -->
                                            <td style="border: none;border-bottom:1px solid #B7B9B8; border-right:1px solid #B7B9B8;" class="">
                                                <p class="table-gszhkhmc">
                                                <c:if test="${not empty designerOption.uploadFile.showImgUrl}">
                                                    <img src="${designerOption.uploadFile.showImgUrl}" class="tableImg" style="width:50px;height:50px;">
                                                    <img src="${designerOption.uploadFile.showImgUrl}" class="posImg" style="width:50px;height:50px;">
                                                </c:if>
                                                <c:if test="${empty designerOption.uploadFile.showImgUrl}">
                                                    <img src="${ctxStatic}/images/pic-none.jpg" >
                                                </c:if>
                                                </p>
                                            </td>
                                            <!-- 项目值 -->
                                            <td style="border: none;border-bottom:1px solid #B7B9B8; border-right:1px solid #B7B9B8"; class="table-gszhkhmc">${designerOption.itemValue}</td>
                                            <!-- 项目费用 -->
                                            <td style="border: none;border-bottom:1px solid #B7B9B8; border-right:1px solid #B7B9B8"; class="table-gszhkhmc" fmt:formatNumber>${designerOption.itemCost}</td>
                                            <!-- 中文全称 -->
                                            <td style="border: none;border-bottom:1px solid #B7B9B8; border-right:1px solid #B7B9B8"; class="table-gszhkhmc">${designerOption.itemNameCN}</td>
                                            <!-- 英文全称 -->
                                            <td style="border: none;border-bottom:1px solid #B7B9B8; border-right:1px solid #B7B9B8"; class="table-gszhkhzh">${designerOption.itemNameEN}</td>
                                            <!-- 日文全称 -->
                                            <td style="border: none;border-bottom:1px solid #B7B9B8; border-right:1px solid #B7B9B8"; class="table-gszhkhwd">${designerOption.itemNameJP}</td>
                                        </tr>
                                        </tbody>
                                    </c:forEach>
                                </table>
                                <div id="hiddenHtml"></div>
                            </div>
                        </div>
                    </div>
                </div>
                 <div class="tabSm smOrderBox">
                    <div class="clearfix">
                        <div class="col-50 items clearfix">
                            <!-- 状态: -->
                            <p class="tit"><spring:message code="common_status"/><spring:message code="common_colon"/></p>
                            <c:if test="${design.enableFlag == 1}">
                                <td style="border: none;border-bottom:1px solid #B7B9B8;" class="table-gszhkhwd">启用</td>
                            </c:if>
                            <c:if test="${design.enableFlag == 0}">
                                <td style="border: none;border-bottom:1px solid #B7B9B8;" class="table-gszhkhwd">停用</td>
                            </c:if>
                        </div>
                        <div class="col-50 items haveToBox">
                            <!-- 描述： -->
                            <p class="tit"><spring:message code="custom_describe"/><spring:message code="common_colon"/></p>
                            <input id="itemNameCn" name="itemNameCn" style="border: none;color: #333;background-color: inherit;margin-left: 30px" disabled="true" value="${design.remarks}" >
                        </div>
                        <div class="col-50 items clearfix">
                            <!-- 必须项目： -->
                            <p class="tit"><spring:message code="custom_have_to_item"/><spring:message code="common_colon"/></p>
                            <c:if test="${design.haveToFlag == 1}">
                                <td style="border: none;border-bottom:1px solid #B7B9B8;" class="table-gszhkhwd"><spring:message code="custom_have_to"/></td>
                            </c:if>
                            <c:if test="${design.haveToFlag == 0}">
                                <td style="border: none;border-bottom:1px solid #B7B9B8;" class="table-gszhkhwd"><spring:message code="custom_not_have_to"/></td>
                            </c:if>
                        </div>
                    </div>

                </div>
            </div>
        </form>
    <script src="${ctxStatic}/layer/layerStyle.js"></script>
    </body>
</html>